<!--
  Copyright 2020 The Chromium Authors. All rights reserved.
  Use of this source code is governed by a BSD-style license that can be
  found in the LICENSE file.
-->
<div id="host"></div>
<template id="tmpl">
  <style> .red { color: red; } </style>
  <div id="inner" class="red">hi!</div>
</template>
<script>
  const template = document.querySelector('#tmpl');
  const root = document.querySelector('#host').attachShadow({mode: 'open'});
  root.appendChild(template.content.cloneNode(true));
</script>
